package com.tunxing.结构型.代理设计模式;

public class TxtPrintProxy implements TxtPrint {
    /**
     * 被代理对象的引用
     */
    public TxtPrint txtPrint;

    public TxtPrintProxy(TxtPrint txtPrint) {
        this.txtPrint = txtPrint;
    }

    @Override
    public void print() {
        System.out.println("加黑");
        txtPrint.print();
        System.out.println("加粗");
    }
}
